package com.azier.kapacitor.script.node;

import com.azier.kapacitor.script.arg.LambdaArg;
import com.azier.kapacitor.script.method.As;
import com.azier.kapacitor.script.method.Quiet;
import com.azier.kapacitor.script.node.nodebind.CommonNodeBind;

import java.util.ArrayList;

/**
* 1 * @Author: luoj
* 2 * @Date: 2019/11/8 11:27
* 3
*/
public class StateCountNode extends AbstractNode implements CommonNodeBind {
    private static final String name = "stateCount";

    public StateCountNode(String lambda) {
        super(new ArrayList<>(),new ArrayList<>(),name);
        this.args.add(new LambdaArg(lambda));
    }

    public StateCountNode as(String value){
        As as = new As(value);
        super.addMethod(as);
        return this;
    }

    /**
    Suppress all error logging events from this node.
    **/
    /**
    禁止来自此节点的所有错误记录事件。
    **/
    public StateCountNode quiet(){
        Quiet quiet = new Quiet();
        super.addMethod(quiet);
        return this;
    }
}